#ifndef __CPU_H__
#define __CPU_H__


#define MCU_PAGE	0x0f
#define REMO_PAGE	0x0d
#define OSD_PAGE	0x07

#define RS_BUF_MAX 	48

#define	I2C_SCL		P1_0
#define	I2C_SDA		P1_1

#define i2cSCL_PIN_STATUS()	              I2C_SCL
#define i2cSDA_PIN_STATUS()               I2C_SDA

void InitSPIIO(void);
void InitCPU(void);
void EnableWatchdog(void);
void DisableWatchdog(void);
void RestartWatchdog(void);

BYTE RS_ready(void);
BYTE RS_rx(void);
void RS_ungetch(BYTE ch);
BYTE read_uart_test(void); //erek 2011-11-7

void RS_tx(BYTE tx_buf);

void delay(WORD cnt);


BOOL WaitTimer0(BYTE TaskID);
BYTE AddTimer0_Dly(BYTE Timeout);
//void DelTimer0_Dly(BYTE TaskID);
void RstTimer0_Dly(BYTE TaskID, BYTE Timeout);




#endif // __CPU_H__
